<template>
	<view class="content">
		<view>基于uivew组件改造，依赖uview组件库</view>
		<album-ad :urls="urls" @preAd="preAd" :locks="locks" openAd :multipleSize="220" fontSize="large" :rowCount="3" :maxCount="6" :maxRow="2"></album-ad>
	</view>
</template>

<script>
	import AlbumAd from '@/components/album-ad/album-ad';
	export default {
		components: {
			AlbumAd,
		},
		data() {
			return {
				title: 'Hello',
				urls: [
					'https://rbtnet.oss-cn-hangzhou.aliyuncs.com/test/20230409/70452ae33c9e483b9164bf5b7f2e31e5.jpg',
					'https://rbtnet.oss-cn-hangzhou.aliyuncs.com/test/20230409/27e373f4592345939c2fe21985e9136e.jpg',
					'https://rbtnet.oss-cn-hangzhou.aliyuncs.com/test/20230409/70452ae33c9e483b9164bf5b7f2e31e5.jpg',
					'https://rbtnet.oss-cn-hangzhou.aliyuncs.com/test/20230409/27e373f4592345939c2fe21985e9136e.jpg',
					'https://rbtnet.oss-cn-hangzhou.aliyuncs.com/test/20230409/70452ae33c9e483b9164bf5b7f2e31e5.jpg',
					'https://rbtnet.oss-cn-hangzhou.aliyuncs.com/test/20230409/70452ae33c9e483b9164bf5b7f2e31e5.jpg',
				],
				locks: 'https://rbtnet.oss-cn-hangzhou.aliyuncs.com/test/20230409/27e373f4592345939c2fe21985e9136e.jpg',  
			} 
		},
		onLoad() {

		},
		methods: {
			preAd(run){
				uni.showModal({
					title: '模拟广告',
					content: '在这里实现调用广告逻辑',
					cancelText: '没有看完',
					confirmText: '看完了',
					success: function(res) {
						if(res.confirm){
							run(true);
						}else{
							run(false);
						}
					}
				});
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
